package com.wangijun.yuan.web.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wangijun.yuan.core.domain.Category;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface CategoryMapper extends BaseMapper<Category> {

    @Update("update category" +
            " set read_num = read_num + #{num}" +
            " where id = #{id}")
    void readNumAdd(@Param("id") Long id, @Param("num") Integer num);

}